import type { App } from 'vue'
import HsCharts from './Charts'
import HsForm, { FormSchema } from './Form'
import HsPage from './Page'
import HsModalForm from './ModalForm'
import HsIcon from './Icon'
import HsSearch from './Search'
import HsTable, { TableFormat } from './Table'
import HsInput from './Input'
import HsSelect from './Select'

import Antd from 'ant-design-vue'

export function registerGC(app: App) {
    // antd compontents
    app.use(Antd)
    // customer components
    app.component(HsCharts.name, HsCharts)
    app.component(HsForm.name, HsForm)
    app.component(HsPage.name, HsPage)
    app.component(HsModalForm.name, HsModalForm)
    app.component(HsIcon.name, HsIcon)
    app.component(HsSearch.name, HsSearch)
    app.component(HsTable.name, HsTable)
    app.component(HsInput.name, HsInput)
    app.component(HsSelect.name, HsSelect)
}

export { HsCharts, HsForm, HsPage, HsModalForm, HsIcon, HsSearch, HsTable }

export type { FormSchema, TableFormat }
